import json
import os
from PIL import Image
import matplotlib.pyplot as plt

fig = plt.figure()
plt.plot(range(10))
plt.savefig("test.png")

dataSet = []
with open("/home/hy/vscode/PyTorch-Tutorial-2nd-main/code/resource/covid-19-demo/labels/train.txt", "r") as f:
    lines = f.read().strip()
    lines = lines.split("\n")
    dataSet = [(line.split(" ")[0], line.split(" ")[1], line.split(" ")[2]) for line in lines]
print(json.dumps(dataSet, indent=4))
print(os.path.join("/home/hy/vscode/PyTorch-Tutorial-2nd-main/code/resource/covid-19-demo/labels", "train.txt"))
